Function.prototype.Myapply = function (content = window, arg) {
  if (content === "" || content === undefined || content === null)
    content = global;
  if (typeof content != Object) content = new Object(content);
  //指定不重复的新key
  let key = Symbol();
  //这里的this就是调用的方法
  content[key] = this;
  const res = content[key](...arg);
  delete content[key];
  return res;
};
let obj = {
  d: 456,
};
function fun(a, b, c) {
  d = 123;
  console.log(a, b, c, this.d);
}
fun.Myapply(obj, [3, 4, 5, 6, 7, 8]); //3 4 5
fun.apply(obj, [3, 4, 5, 6, 7, 8]);
